<extend name="Template/index"/>
<block name="title">
   系统消息
</block>  
<block name="carousel"></block>
<block name="nav-pos">
<span class="glyphicon glyphicon-home"></span>
    <li>您当前所在位置 ：</li>
	<li><a href="{:U('personalCenter/index')}">个人中心</a></li>
    <li><a href="{:U('personalCenter/systemMessage')}">系统消息</a></li>
	<li>系统消息详情</li>
</block>
<block name="main">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/personalCenter.css"/>	
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/systemMessage.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/systemMessage_details.css"/>	
		<div class="main">
				<div id="personalCenterDetails">
					<div id="personalCenter" style="min-height:400px;">

                        <div class="title">{$message.mes_title}</div>
                        <div class="content" >
                            <div>申请人 : <a href="{:U('personalCenter/user')}?id={$message.id}">{$message.nickname}</a> </div>
                            <div>申请项目 : <a href="{:U('project/project_details')}?id={$message.mes_pro}">{$message.mes_content}</a></div>

                        </div>
                        <if condition="($message['mes_title'] eq '项目申请') OR ($message['mes_title'] eq '申请通过') OR ($message['mes_title'] eq '申请未通过')">
                            <div class="title">
                            <if condition="$message['mes_agree'] eq 0">
                                <input type="button" class="button btn agree" id="1" value="同意">
                                <input type="button" class="button btn agree" id="2" value="拒绝">
                                <script>
                                    $('.agree').click(function(){
                                        $.ajax({
                                            async:false,
                                            type:'post',
                                            url:"{:U('personalCenter/agree_ajax')}",
                                            data:{mes_agree:$(this).attr('id'),mes_id:"{$get.mes_id}",user_id:"{$message.id}",mes_pro:"{$message.mes_pro}",mes_content:"{$message.mes_content}"},
                                            success:function(val){
                                                alert(val);
                                                history.go(0);
                                            }
                                        })
                                    })


                                </script>
                            <elseif condition="$message['mes_agree'] eq 1"/>
                                <input type="button" class="button btn" value="已同意" disabled>
                            <else/>
                                <input type="button" class="button btn" value="已拒绝" disabled>
                            </if>

                            </div>

                        </if>
                        <div  style="font-size:14px;width:50%;text-align:center;float:right;">{$message.mes_time|date="Y-m-d H:i:s",###}</div>
                    </div>

                </div>
		</div>

    <script>

            $(document).ready(function(){
                $.ajax({
                    async:false,
                    type:'post',
                    url:"{:U('personalCenter/load_ajax')}",
                    data:{mes_state:1,mes_id:"{$get.mes_id}"},
                    success:function(val){
                    }
                })
            })

    </script>
</block>
